@echo off
echo ========================================
echo 验证TB_TAG功能修复结果
echo ========================================

echo 1. 检查编译状态...
call mvn compile -q
if %ERRORLEVEL% neq 0 (
    echo [ERROR] 编译失败！
    pause
    exit /b 1
)
echo [SUCCESS] 编译成功！

echo.
echo 2. 检查ruoyi-homepage模块...
if exist "ruoyi-homepage\target\ruoyi-homepage-3.9.0.jar" (
    echo [SUCCESS] ruoyi-homepage模块已正确编译
) else (
    echo [ERROR] ruoyi-homepage模块编译失败
)

echo.
echo 3. 检查关键文件...
if exist "ruoyi-homepage\pom.xml" (
    echo [SUCCESS] ruoyi-homepage/pom.xml 存在
) else (
    echo [ERROR] ruoyi-homepage/pom.xml 缺失
)

if exist "ruoyi-admin\src\main\java\com\ruoyi\web\controller\homepage\TbTagController.java" (
    echo [SUCCESS] TbTagController.java 存在
) else (
    echo [ERROR] TbTagController.java 缺失
)

if exist "ruoyi-admin\src\main\resources\mapper\homepage\TbTagMapper.xml" (
    echo [SUCCESS] TbTagMapper.xml 存在
) else (
    echo [ERROR] TbTagMapper.xml 缺失
)

echo.
echo ========================================
echo 验证完成！
echo ========================================
echo.
echo 下一步操作：
echo 1. 执行数据库脚本：source fix_tb_tag_oceanbase.sql;
echo 2. 启动应用：mvn spring-boot:run -pl ruoyi-admin
echo 3. 测试接口：http://localhost:8080/test/tbtag/ping
echo ========================================
pause
